<!DOCTYPE html>
<html>

<head>
    <!-- 页面meta -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <title>{% block title %}{% endblock %}| cms管理系统</title>

    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" name="viewport">

    <!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  <![endif]-->
    <!-- 页面meta /-->

    <link rel="stylesheet" href="{% static 'adminlte/bootstrap/css/bootstrap.min.css' %}">
    <link rel="stylesheet" href="{% static 'adminlte/font-awesome/css/font-awesome.min.css' %}">
    <link rel="stylesheet" href="{% static 'adminlte/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css' %}">
    <link rel="stylesheet" href="{% static 'adminlte/adminLTE/css/AdminLTE.css' %}">
    <link rel="stylesheet" href="{% static 'adminlte/adminLTE/css/skins/_all-skins.min.css' %}">
    <link rel="stylesheet" href="{% static 'adminlte/css/style.css' %}">
    <link rel="stylesheet" href="{% static 'adminlte/ionslider/ion.rangeSlider.css' %}">
    <link rel="stylesheet" href="{% static 'adminlte/ionslider/ion.rangeSlider.skinNice.css' %}">
    <link rel="stylesheet" href="{% static 'sweetalert/sweetalert.css' %}">

    <script src="{% static 'adminlte/jQuery/jquery-2.2.3.min.js' %}"></script>
    <script src="{% static 'adminlte/jQueryUI/jquery-ui.min.js' %}"></script>
    <script>
        $.widget.bridge('uibutton', $.ui.button);
    </script>
    <script src="{% static 'adminlte/bootstrap/js/bootstrap.min.js' %}"></script>
    <script src="{% static 'adminlte/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js' %}"></script>
    <script src="{% static 'adminlte/adminLTE/js/app.min.js' %}"></script>
    <script src="{% static 'adminlte/select2/select2.full.min.js' %}"></script>
    <script src="{% static 'js/messages.min.js' %}"></script>
    <script src="{% static 'js/linAjax.min.js' %}"></script>
    <script src="{% static 'sweetalert/sweetalert.min.js' %}"></script>
    <script src="{% static 'js/linalert.min.js' %}"></script>
    {% block head %}{% endblock %}
</head>

<body class="hold-transition skin-purple sidebar-mini">

<div class="wrapper">

    <!-- 页面头部 -->
    <header class="main-header">


        <!-- Logo -->
        <a href="{% url 'cms:index' %}" class="logo">
            <!-- mini logo for sidebar mini 50x50 pixels -->
            <span class="logo-mini"><b>CMS</b></span>
            <!-- logo for regular state and mobile devices -->
            <span class="logo-lg"><b>CMS</b>后台管理</span>
        </a>


        <!-- Header Navbar: style can be found in header.less -->
        <nav class="navbar navbar-static-top">
            <!-- Sidebar toggle button-->
            <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
                <span class="sr-only">Toggle navigation</span>
            </a>

            <div class="navbar-custom-menu">
                <ul class="nav navbar-nav">
                    <!-- User Account: style can be found in dropdown.less -->
                    <li class="dropdown user user-menu">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <img src="http://edu-image.nosdn.127.net/f243d27bfcdd48d2adb43c75d1fd2c14.jpeg?imageView&quality=100"
                                 class="user-image" alt="User Image">
                            <span class="hidden-xs">{{ user.username }}</span>
                        </a>
                        <ul class="dropdown-menu">
                            <!-- User image -->
                            <li class="user-header">
                                <img src="http://edu-image.nosdn.127.net/f243d27bfcdd48d2adb43c75d1fd2c14.jpeg?imageView&quality=100"
                                     class="img-circle" alt="User Image">

                                <p>
                                    {{ user.username }}
                                    <small>最后登录 {{ user.last_login }}</small>
                                </p>
                            </li>
                            <!-- Menu Footer-->
                            <li class="user-footer">
                                <div class="pull-left">
                                    <a href="#" class="btn btn-default btn-flat">修改密码</a>
                                </div>
                                <div class="pull-right">
                                    <a href="{% url 'ynauth:logout' %}" class="btn btn-default btn-flat">注销</a>
                                </div>
                            </li>
                        </ul>
                    </li>

                </ul>
            </div>
        </nav>
    </header>
    <!-- 页面头部 /-->

    <!-- 导航侧栏 -->
    <aside class="main-sidebar">
        <section class="sidebar">
            <form action="#" method="get" class="sidebar-form">
                <div class="input-group">
                    <input type="text" name="q" class="form-control" placeholder="搜索">
                    <span class="input-group-btn">
                <button type="submit" name="search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i>
                </button>
          </span>
                </div>
            </form>
            <ul class="sidebar-menu" data-widget="tree">
                <li class="active">
                    <a href="{% url 'cms:index' %}">
                        <i class="fa fa-home"></i>
                        <span>首页</span>
                    </a>
                </li>
                <li class="header">文章管理</li>
                <li>
                    <a href="{% url 'cms:write_article' %}">
                        <i class="fa fa-edit"></i>
                        <span>发布文章</span>
                    </a>
                </li>
                <li>
                    <a href="{% url 'cms:article_category' %}">
                        <i class="fa fa-tags"></i>
                        <span>文章分类</span>
                    </a>
                </li>
                <li>
                    <a href="{% url 'cms:article_list' %}">
                        <i class="fa fa-list"></i>
                        <span>文章列表</span>
                    </a>
                </li>
                <li>
                    <a href="{% url 'cms:banners' %}">
                        <i class="fa fa-window-restore"></i>
                        <span>轮播图</span>
                    </a>
                </li>
                <li>
                    <a href="{% url 'cms:ad_list' %}">
                        <i class="fa fa-window-restore"></i>
                        <span>广告</span>
                    </a>
                </li>

                <li class="header">员工管理</li>
                <li>
                    <a href="#">
                        <i class="fa fa-group"></i>
                        <span>员工列表</span>
                    </a>
                </li>
            </ul>
        </section>
    </aside>
    <!-- 导航侧栏 /-->

    <!-- 内容区域 -->
    <div class="content-wrapper">
        <section class="content-header">
            {% block content-header %}{% endblock %}
        </section>
        <section class="content">
            {% block content %}{% endblock %}
        </section>
    </div>
    <!-- 内容区域 /-->

    <!-- 底部导航 -->
    <footer class="main-footer">
        <div class="pull-right hidden-xs">
            <b>Version</b> 1.0.8
        </div>
        <strong>自闭技术宅</strong> All rights reserved.
    </footer>
    <!-- 底部导航 /-->

</div>

<script>
    $(document).ready(function () {
        // 选择框
        $(".select2").select2();

        // WYSIHTML5编辑器
        $(".textarea").wysihtml5({
            locale: 'zh-CN'
        });
    });


    // 设置激活菜单
    function setSidebarActive(tagUri) {
        var liObj = $("#" + tagUri);
        if (liObj.length > 0) {
            liObj.parent().parent().addClass("active");
            liObj.addClass("active");
        }
    }


    $(document).ready(function () {
        // 激活导航位置
        setSidebarActive("admin-index");
    });
</script>
</body>

</html>
<!---->